package org.ntu.rtsearch.analysis;

import java.util.HashSet;
import java.util.Set;

/**
 * @author fuhao(email: hfhimage@gmail.com)         
 * @date 2011-7-25
 */
public class StopwordFilter {
	
	private Set<String> container = new HashSet<String>();
	
	public static final String[] ENGLISH_STOP_WORDS = { "a", "an", "and",
		"are", "as", "at", "be", "but", "by", "for", "if", "in", "into",
		"is", "it", "no", "not", "of", "on", "or", "s", "such", "t",
		"that", "the", "their", "then", "there", "these", "they", "this",
		"to", "was", "will", "with", "RT" };
	
	
	public StopwordFilter() {
		for (String str : ENGLISH_STOP_WORDS) {
			container.add(str);
		}
	}
	
	public boolean isStopword(String word) {
		return container.contains(word);
	}
}
